package com.ward.thread;

/**
 * Created by ward on 2017-09-12.
 */
public class JoinMain {
    public volatile static int i=0;

    public static class AddThread extends Thread{
        @Override
        public void run(){
            for (i=0;i<100000;i++);
        }
    }

    public static void main(String[] args) throws InterruptedException{
        AddThread at=new AddThread();
        at.start();
        at.join();
        System.out.println(i);
    }
}
